<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<fmt:bundle basename="StripesResources" /> 
<html>
    <head>
        <title><fmt:message key='index.title'/></title>
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/style.css"/>
    </head>
    <body>
        <h1><fmt:message key='index.pa165'/></h1>
    <center>
        <s:useActionBean beanclass="cz.muni.fi.pa165.hauntedhouses.web.SecurityActionBean" var="actionBean"/>
        <s:errors>
            <s:errors-header><p style="color: red;"><fmt:message key='index.validationerror'/></p></s:errors-header>
            <s:individual-error/>
            <s:errors-footer><br /></s:errors-footer>
        </s:errors>
        <br /><br />
        <div id="loginForm">
            <div class="loginMessage"><fmt:message key='index.logpass'/></div>
            <br />
            <s:form beanclass="cz.muni.fi.pa165.hauntedhouses.web.SecurityActionBean" >
                <div class="row">
                    <span class="label"><fmt:message key='index.nick'/></span>
                    <span class="form"><s:text name="username" size="30" /></span>

                </div>
                <div class="row">
                    <span class="label"><fmt:message key='index.pass'/></span>
                    <span class="form"><s:password name="password" size="30" /></span>
                    <div class="spacer">&nbsp;</div>
                </div>
                <div class="row">
                    <span class="form"><s:submit class="primary button" name="submitLogin" ><fmt:message key='menu.login'/></s:submit></span>
                    <div class="spacer">&nbsp;</div>
                </div>
            </s:form>
        </div>
        <br />
        <div id="registerForm">
            <div class="registerMessage"><fmt:message key='index.promo'/></div>
            <br />
            <s:form beanclass="cz.muni.fi.pa165.hauntedhouses.web.SecurityActionBean" >
                <div class="row">
                    <span class="label"><fmt:message key='index.nick'/></span>
                    <span class="form"><s:text name="registerUsername" size="30" /></span>

                </div>
                <div class="row">
                    <span class="label"><fmt:message key='index.pass'/></span>
                    <span class="form"><s:password name="registerPassword" size="30" /></span>
                    <div class="spacer">&nbsp;</div>
                </div>
                <div class="row">
                    <span class="form"><s:submit class="primary button" name="submitRegister" ><fmt:message key='menu.register'/></s:submit></span>
                    <div class="spacer">&nbsp;</div>
                </div>
            </s:form>
        </div>

    </center>
</body>
</html>